package com.bocloud.cmp.entity.resource;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.bocloud.common.utils.DateSerializer;
import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.IgnoreInsert;
import com.bocloud.entity.annotations.IgnoreUpdate;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * 机柜类
 * 
 * @author wei wei
 * @version 1.0
 * @since 2016.02.26
 */
@Table("rack")
public class Rack extends GenericEntity {

	@PK(value = PKStrategy.AUTO)
	private Long id; // ID
	@Column("specs")
	private String specs; // 规格{长，宽，高}
	@Column("vendor")
	private String vendor; // 供应商
	@Column("product_date")
	@JsonSerialize(using = DateSerializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date productDate; // 生产日期
	@Column("product_sn")
	private String productSn; // 出厂编号
	@Column("warranty")
	private String warranty; // 质保期
	@Column("type")
	private String type; // 类型{控制台机柜，标准机柜、网络机柜}
	@IgnoreInsert
	@IgnoreUpdate
	private String typeName; // 类型名称
	@Column("slot_amount")
	private Integer slotAmount; // 卡槽数量
	@Column("material")
	private String material; // 机柜材质
	@IgnoreInsert
	@IgnoreUpdate
	private String materialName; // 材质名称
	@Column("room_id")
	private Long roomId; // 机房ID
	@IgnoreInsert
	@IgnoreUpdate
	private String roomname; // 机房名称
	@Column("unit")
	private Integer unit; // U数
	@Column("axis_x")
	private Integer axisX; // 第几行
	@Column("axis_y")
	private Integer axisY; // 第几列
	@IgnoreInsert
	@IgnoreUpdate
	private Long dcId; // 数据中心ID
	@IgnoreInsert
	@IgnoreUpdate
	private String dcname; // 数据中心名称
	@IgnoreInsert
	@IgnoreUpdate
	private Integer racks; // 机柜数量
	@IgnoreInsert
	@IgnoreUpdate
	private Integer servers; // 服务器数量
	@IgnoreAll
	private Integer networks; // 网络设备数量
	@IgnoreAll
	private Integer storages; // 存储设备数量
	@IgnoreAll
	private Integer alarms; // 告警数量

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the specs
	 */
	public String getSpecs() {
		return specs;
	}

	/**
	 * @param specs
	 *            the specs to set
	 */
	public void setSpecs(String specs) {
		this.specs = specs;
	}

	/**
	 * @return the vendor
	 */
	public String getVendor() {
		return vendor;
	}

	/**
	 * @param vendor
	 *            the vendor to set
	 */
	public void setVendor(String vendor) {
		this.vendor = vendor;
	}

	/**
	 * @return the productDate
	 */
	public Date getProductDate() {
		return productDate;
	}

	/**
	 * @param productDate
	 *            the productDate to set
	 */
	public void setProductDate(Date productDate) {
		this.productDate = productDate;
	}

	/**
	 * @return the productSn
	 */
	public String getProductSn() {
		return productSn;
	}

	/**
	 * @param productSn
	 *            the productSn to set
	 */
	public void setProductSn(String productSn) {
		this.productSn = productSn;
	}

	/**
	 * @return the warranty
	 */
	public String getWarranty() {
		return warranty;
	}

	/**
	 * @param warranty
	 *            the warranty to set
	 */
	public void setWarranty(String warranty) {
		this.warranty = warranty;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the typeName
	 */
	public String getTypeName() {
		return typeName;
	}

	/**
	 * @param typeName
	 *            the typeName to set
	 */
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	/**
	 * @return the slotAmount
	 */
	public Integer getSlotAmount() {
		return slotAmount;
	}

	/**
	 * @param slotAmount
	 *            the slotAmount to set
	 */
	public void setSlotAmount(Integer slotAmount) {
		this.slotAmount = slotAmount;
	}

	/**
	 * @return the material
	 */
	public String getMaterial() {
		return material;
	}

	/**
	 * @param material
	 *            the material to set
	 */
	public void setMaterial(String material) {
		this.material = material;
	}

	/**
	 * @return the materialName
	 */
	public String getMaterialName() {
		return materialName;
	}

	/**
	 * @param materialName
	 *            the materialName to set
	 */
	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}

	/**
	 * @return the roomId
	 */
	public Long getRoomId() {
		return roomId;
	}

	/**
	 * @param roomId
	 *            the roomId to set
	 */
	public void setRoomId(Long roomId) {
		this.roomId = roomId;
	}

	/**
	 * @return the roomname
	 */
	public String getRoomname() {
		return roomname;
	}

	/**
	 * @param roomname
	 *            the roomname to set
	 */
	public void setRoomname(String roomname) {
		this.roomname = roomname;
	}

	/**
	 * @return the unit
	 */
	public Integer getUnit() {
		return unit;
	}

	/**
	 * @param unit
	 *            the unit to set
	 */
	public void setUnit(Integer unit) {
		this.unit = unit;
	}

	/**
	 * @return the axisX
	 */
	public Integer getAxisX() {
		return axisX;
	}

	/**
	 * @param axisX
	 *            the axisX to set
	 */
	public void setAxisX(Integer axisX) {
		this.axisX = axisX;
	}

	/**
	 * @return the axisY
	 */
	public Integer getAxisY() {
		return axisY;
	}

	/**
	 * @param axisY
	 *            the axisY to set
	 */
	public void setAxisY(Integer axisY) {
		this.axisY = axisY;
	}

	/**
	 * @return the dcId
	 */
	public Long getDcId() {
		return dcId;
	}

	/**
	 * @param dcId
	 *            the dcId to set
	 */
	public void setDcId(Long dcId) {
		this.dcId = dcId;
	}

	/**
	 * @return the dcname
	 */
	public String getDcname() {
		return dcname;
	}

	/**
	 * @param dcname
	 *            the dcname to set
	 */
	public void setDcname(String dcname) {
		this.dcname = dcname;
	}

	/**
	 * @return the racks
	 */
	public Integer getRacks() {
		return racks;
	}

	/**
	 * @param racks
	 *            the racks to set
	 */
	public void setRacks(Integer racks) {
		this.racks = racks;
	}

	/**
	 * @return the servers
	 */
	public Integer getServers() {
		return servers;
	}

	/**
	 * @param servers
	 *            the servers to set
	 */
	public void setServers(Integer servers) {
		this.servers = servers;
	}

	/**
	 * @return the networks
	 */
	public Integer getNetworks() {
		return networks;
	}

	/**
	 * @param networks
	 *            the networks to set
	 */
	public void setNetworks(Integer networks) {
		this.networks = networks;
	}

	/**
	 * @return the storages
	 */
	public Integer getStorages() {
		return storages;
	}

	/**
	 * @param storages
	 *            the storages to set
	 */
	public void setStorages(Integer storages) {
		this.storages = storages;
	}

	public Integer getAlarms() {
		return alarms;
	}

	public void setAlarms(Integer alarms) {
		this.alarms = alarms;
	}

}
